package pl.edu.agh.iosr.gamblingzone.dao.ejb;

import java.util.Collection;

import pl.edu.agh.iosr.gamblingzone.dao.MoneyVoucherRequestDAO;
import pl.edu.agh.iosr.gamblingzone.model.MoneyVoucherRequest;
import pl.edu.agh.iosr.gamblingzone.model.User;

/**
 * The Class MoneyVoucherRequestDAOBean.
 */
public class MoneyVoucherRequestDAOBean extends GenericDAOBean<MoneyVoucherRequest, Long>
	implements MoneyVoucherRequestDAO {

	/* (non-Javadoc)
	 * @see pl.edu.agh.iosr.gamblingzone.dao.MoneyVoucherRequestDAO#findAll(pl.edu.agh.iosr.gamblingzone.model.User, int)
	 */
	public Collection<MoneyVoucherRequest> findAll(User user, int page) {
		return findAll(user, "owner", page);
	}

	/* (non-Javadoc)
	 * @see pl.edu.agh.iosr.gamblingzone.dao.MoneyVoucherRequestDAO#getEntitiesCount(pl.edu.agh.iosr.gamblingzone.model.User)
	 */
	public int getEntitiesCount(User u) {
		return getEntitiesCount(u, "owner");
	}

}
